﻿<%@ Page Title="FP : Manage Data" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ManageData.aspx.cs" Inherits="FlexiPay.ManageData" %>

<%@ Register Assembly="Trirand.Web" TagPrefix="trirand" Namespace="Trirand.Web.UI.WebControls" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <!-- The jQuery UI theme that will be used by the grid -->
    <link rel="stylesheet" type="text/css" media="screen" href="/Styles/redmond/jquery-ui-1.8.2.custom.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="/Styles/ui.jqgrid.css" />
    <!-- jQuery runtime minified -->
    <script src="/trirand_js/jquery-1.5.2.min.js" type="text/javascript"></script>
    <!-- The localization file we need, English in this case -->
    <script src="/trirand_js/trirand/i18n/grid.locale-en.js" type="text/javascript"></script>
    <!-- The jqGrid client-side javascript -->
    <script src="/trirand_js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="/trirand_js/trirand/jquery.jqDatePicker.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" media="screen" href="/Styles/ajaxTabStyleSheet.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width: 100%;" border="1">
        <tr>
            <td align="center" valign="middle">
                <asp:SqlDataSource ID="SDSTableList" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                    SelectCommand="SELECT DISTINCT [TableName] FROM [TablesList] WHERE ([TableType] IN ('ExternalMaster','ExternalMaster1C','InternalMaster') )">
                </asp:SqlDataSource>
                <asp:Label ID="Label1" Font-Bold="true" runat="server" Text="  Select Table  " BorderColor="Black"
                    BorderStyle="None" ForeColor="Black"> </asp:Label>
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <asp:DropDownList ID="TableListDropDown" runat="server" DataSourceID="SDSTableList"
                    DataValueField="TableName" DataTextField="TableName" AutoPostBack="True" OnDataBound="TableListDropDown_DataBound"
                    OnSelectedIndexChanged="TableListDropDown_SelectedIndexChanged" />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <asp:Button ID="ButtonViewData" runat="server" Text="View Data" OnClick="ButtonViewData_Click" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="left" valign="top" style="height: 350px;">
                <ajax:TabContainer ID="TabContainer1" runat="server" Width="100%" ScrollBars="None"
                    ActiveTabIndex="6">
                    <ajax:TabPanel ID="TabData_Sales" runat="server" HeaderText="TabSales">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGridSalesInput" runat="server" Width="900px" Height="300px"
                                DataSourceID="SDSSalesData" OnRowAdding="OnRowAdding_SalesData" OnRowEditing="OnRowEditing_SalesData"
                                OnRowDeleting="OnRowDeleting_SalesData">
                                <Columns>
                                    <trirand:JQGridColumn DataField="AGREEMENTID" PrimaryKey="True" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="AGREEMENTNO" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="AGREEMENTDATE" Editable="true" DataType="DateTime"
                                        SearchType="DatePicker" EditType="DatePicker" EditorControlID="DatePicker1" SearchControlID="DatePicker1"
                                        DataFormatString="{0:yyyy-MM-dd}">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:DateValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DISB_DATE" Editable="true" DataType="DateTime" SearchType="DatePicker"
                                        EditType="DatePicker" EditorControlID="DatePicker1" SearchControlID="DatePicker1"
                                        DataFormatString="{0:yyyy-MM-dd}">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:DateValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DISBURSALAMOUNT" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DISB_AMT" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="AMTFIN" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PRETAXIRR" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:NumberValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="LESSEEID" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="TENURE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EMI" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="FILENO" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="BRANCHNM" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MODELNO" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MANUFACTURERDESC" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="NAME" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DEALERNAME" Editable="true" />
                                    <trirand:JQGridColumn DataField="ADVANCEINSTL" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PROCESSINGFEE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MFR_SUBVENTION_IN" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MFR_SUBVENTION_PAID" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DEALER_SUBVENTION" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DMA_SUBVENTION" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PROMOTIONDESC" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MARGINMONEY" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:NumberValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="ADVANCE_EMI" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EMPLOYERNAME" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="STATUS" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MAKE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="V_ASSET_CATG" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PRODUCTFLAG" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="BRANCH_CODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DMABROKERCODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="SCHEMECODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PROMOTIONSCHEME" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EFFRATE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:NumberValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MODELCODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="SUBMODELCODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="GROSS_LTV" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:NumberValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="NET_LTV" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:NumberValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="FINALSOURCE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="FIRSTSOURCE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CUSTCATG" Editable="true" />
                                    <trirand:JQGridColumn DataField="DMA_SUBVENTION_NOT_DED" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EMPTYPE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CFOC" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="STATE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CHANNELCODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="MANUFACTURERID" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EMPLOYERID" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="INFAVOUROF" Editable="true" />
                                    <trirand:JQGridColumn DataField="CHEQUESTATUS" Editable="true" />
                                    <trirand:JQGridColumn DataField="OSP_CODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DME_NAME" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DUMMY" Editable="true" />
                                    <trirand:JQGridColumn DataField="CUSTOMER_NAME" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PAYMENT_MODE" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EntryStatus" />
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                    <trirand:JQGridColumn DataField="ModifiedBy" />
                                    <trirand:JQGridColumn DataField="ModifiedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSSalesData" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [CarSalesData]"></asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabCityCategory" runat="server" HeaderText="TabCityCat">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGridCityCategory" runat="server" Width="900px" Height="300px"
                                DataSourceID="SDSCityCategory" OnRowAdding="OnRowAdding_CityCat" OnRowEditing="OnRowEditing_CityCat"
                                OnRowDeleting="OnRowDeleting_CityCat">
                                <Columns>
                                    <trirand:JQGridColumn DataField="RowNo" PrimaryKey="True" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="CityName" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="State" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="Category" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSCityCategory" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [CityCategory]"></asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabDMAMaster" runat="server" HeaderText="TabDMAMaster">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGridDMAMaster" runat="server" Width="900px" Height="300px"
                                DataSourceID="SDSDMAMaster" OnRowAdding="OnRowAdding_DMAMaster" OnRowEditing="OnRowEditing_DMAMaster"
                                OnRowDeleting="OnRowDeleting_DMAMaster">
                                <Columns>
                                    <trirand:JQGridColumn DataField="Product" Editable="true" EditType="DropDown" SearchType="DropDown"
                                        EditorControlID="DDLProduct" SearchControlID="DDLProduct">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="BrokerCode" PrimaryKey="True" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DmaType" Editable="true" EditType="DropDown" SearchType="DropDown"
                                        EditorControlID="DDL_DMAType" SearchControlID="DDL_DMAType">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="poBranch" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="DmaName" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="IBoxId" Editable="true" Searchable="false">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="PanNo" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="AccountNo" Editable="true" Searchable="false">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="IFSCCode" Editable="true" ConvertEmptyStringToNull="true" />
                                    <trirand:JQGridColumn DataField="MOP" Editable="true" EditType="DropDown" SearchType="DropDown"
                                        EditorControlID="DDLMOP" SearchControlID="DDLMOP">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="SAPCode" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSDMAMaster" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [DMAMaster]"></asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabSegment" runat="server" HeaderText="TabSegment">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGridSegment" runat="server" Width="900px" Height="300px" DataSourceID="SDSSegment"
                                OnRowAdding="OnRowAdding_Segments" OnRowEditing="OnRowEditing_Segments" OnRowDeleting="OnRowDeleting_Segments">
                                <Columns>
                                    <trirand:JQGridColumn DataField="RowNo" PrimaryKey="True" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="Make" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="ModelNo" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="ManufacturerDesc" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="Segment" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSSegment" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [Segments]"></asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabSource" runat="server" HeaderText="TabSource">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGridSource" runat="server" Width="900px" Height="300px" DataSourceID="SDSSource"
                                OnRowAdding="OnRowAdding_Source" OnRowEditing="OnRowEditing_Source" OnRowDeleting="OnRowDeleting_Source">
                                <Columns>
                                    <trirand:JQGridColumn DataField="RowNo" PrimaryKey="True" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="FinalSource" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="FirstSource" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="EmpType" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSSource" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [Source]"></asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabGenTable" runat="server" HeaderText="TabGenTable">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGridGenTable" runat="server" Width="900px" Height="300px" DataSourceID="SDSGenTable"
                                OnRowAdding="OnRowAdding_GenTable" OnRowEditing="OnRowEditing_GenTable" OnRowDeleting="OnRowDeleting_GenTable">
                                <Columns>
                                    <trirand:JQGridColumn DataField="RowNo" PrimaryKey="True" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="Category" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="Name" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="Value" Editable="true" DataType="String">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSGenTable" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [GenericTable] WHERE (([Category] = @Category) AND ([Name] = @Name))">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="GenTable" Name="Category" Type="String" />
                                    <asp:ControlParameter ControlID="TableListDropDown" Name="Name" PropertyName="SelectedValue"
                                        Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabTaxMaster" runat="server" HeaderText="TabTaxMaster">
                        <ContentTemplate>
                            <trirand:JQGrid ID="JQGRidTaxMaster" runat="server" Width="900px" Height="300px"
                                DataSourceID="SDSTaxMaster" OnRowAdding="OnRowAdding_TaxMaster" OnRowEditing="OnRowEditing_TaxMaster"
                                OnRowDeleting="OnRowDeleting_TaxMaster">
                                <Columns>
                                    <trirand:JQGridColumn DataField="RowNo" PrimaryKey="True" Visible="false" Searchable="false" />
                                    <trirand:JQGridColumn DataField="State" Editable="true">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="TaxType" Editable="true" EditType="DropDown" EditorControlID="DDTaxTypes"
                                        SearchType="DropDown" SearchControlID="DDTaxTypes">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="Priority" Editable="true" Searchable="false">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                            <trirand:MinValueValidator MinValue="0" />
                                            <trirand:MaxValueValidator MaxValue="9" />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="TaxPercent" Editable="true" Searchable="false">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:NumberValidator />
                                            <trirand:MinValueValidator MinValue="0" />
                                            <trirand:MaxValueValidator MaxValue="100" />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="TaxRange" Editable="true" Searchable="false">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:IntegerValidator />
                                            <trirand:MinValueValidator MinValue="0" />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="FromDate" Editable="true" DataType="DateTime" SearchType="DatePicker"
                                        EditType="DatePicker" EditorControlID="DatePicker1" SearchControlID="DatePicker1"
                                        DataFormatString="{0:yyyy-MM-dd}">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:DateValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="ToDate" Editable="true" DataType="DateTime" SearchType="DatePicker"
                                        EditType="DatePicker" EditorControlID="DatePicker1" SearchControlID="DatePicker1"
                                        DataFormatString="{0:yyyy-MM-dd}">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                            <trirand:DateValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="Applicable" Editable="true" Searchable="false" EditType="DropDown"
                                        EditorControlID="DDApplicable" SearchType="DropDown" SearchControlID="DDApplicable">
                                        <EditClientSideValidators>
                                            <trirand:RequiredValidator />
                                        </EditClientSideValidators>
                                    </trirand:JQGridColumn>
                                    <trirand:JQGridColumn DataField="CreatedBy" />
                                    <trirand:JQGridColumn DataField="CreatedOn" DataType="DateTime" SearchType="DatePicker"
                                        SearchControlID="DatePicker1" Searchable="false" />
                                </Columns>
                                <SearchDialogSettings MultipleSearch="True" Resizable="true" ValidateInput="true" />
                                <ToolBarSettings ShowAddButton="True" ShowEditButton="True" ShowRefreshButton="True"
                                    ShowSearchButton="True" ShowViewRowDetailsButton="True" ShowDeleteButton="true" />
                                <SortSettings InitialSortColumn="" />
                                <AddDialogSettings CloseAfterAdding="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <DeleteDialogSettings Height="300" ReloadAfterSubmit="true" Resizable="true" />
                                <EditDialogSettings CloseAfterEditing="true" Height="300" ReloadAfterSubmit="true"
                                    Resizable="true" />
                                <AppearanceSettings ShowRowNumbers="True" ShrinkToFit="False" />
                                <PagerSettings ScrollBarPaging="true" PageSize="20" />
                            </trirand:JQGrid>
                            <asp:SqlDataSource ID="SDSTaxMaster" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT * FROM [TaxMaster]"></asp:SqlDataSource>
                        </ContentTemplate>
                    </ajax:TabPanel>
                </ajax:TabContainer>
            </td>
        </tr>
    </table>
    <trirand:JQDatePicker DisplayMode="ControlEditor" runat="server" ID="DatePicker1"
        DateFormat="yyyy-MM-dd" MinDate="2011-01-01" MaxDate="2020-01-01" ShowOn="Focus" />
    <asp:DropDownList ID="DDLMOP" runat="server" DataSourceID="SDSMOP" DataTextField="Value" />
    <asp:DropDownList ID="DDLProduct" runat="server" DataSourceID="SDSproduct" DataTextField="Value" />
    <asp:DropDownList ID="DDL_DMAType" runat="server" DataSourceID="SDS_DMAType" DataTextField="Value" />
    <asp:SqlDataSource ID="SDSMOP" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
        SelectCommand="SELECT Value FROM GenericTable WHERE Category = 'DMAMaster' AND Name = 'MOP'">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SDSproduct" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
        SelectCommand="SELECT Value FROM GenericTable WHERE Category = 'DMAMaster' AND Name = 'Products'">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SDS_DMAType" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
        SelectCommand="SELECT Value FROM GenericTable WHERE Category = 'DMAMaster' AND Name = 'DMATypes'">
    </asp:SqlDataSource>
    <asp:DropDownList ID="DDApplicable" runat="server">
        <asp:ListItem Text="Gross" Selected="True" Value="Gross"></asp:ListItem>
        <asp:ListItem Text="Taxable" Value="Taxable"></asp:ListItem>
    </asp:DropDownList>
    <asp:DropDownList ID="DDTaxTypes" runat="server">
        <asp:ListItem Text="EducationCess" Selected="True"></asp:ListItem>
        <asp:ListItem Text="ExemptionLimit"></asp:ListItem>
        <asp:ListItem Text="MuncipalTax"></asp:ListItem>
        <asp:ListItem Text="ServiceTax"></asp:ListItem>
        <asp:ListItem Text="IncomeTax"></asp:ListItem>
    </asp:DropDownList>
</asp:Content>
